﻿@{
    ViewData["Title"] = "模块管理";
}

<ol class="breadcrumb">
    <li><span class="fa fa-home"></span>  <a asp-controller="Home" asp-action="Index">首页</a></li>
    <li><a asp-controller="System" asp-action="Index">系统配置</a></li>
    <li class="active">模块管理</li>
</ol>
<table id="moduletable"></table>

@section aside{

    @Html.Partial("SystemAside")
}
@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
    <script type="text/javascript">
        $(document).ready(function () {
            $('#moduletable').bootstrapTable({
                url: '@Url.Action("List")',
                columns: [{
                    field: 'moduleId',
                    title: '序号'
                }, {
                    field: 'name',
                    title: '名称',
                    formatter: function (value, row, index) {
                        return '<a href="@Url.Action("Details")/' + row.moduleId + '">' + value + '</a>';
                    }
                }, {
                    field: 'controller',
                    title: '控制器'
                }, {
                    field: 'description',
                    title: '说明'
                }, {
                    field: 'enabled',
                    title: '状态',
                    formatter:function(value,row,index)
                    {
                        return value ? '<i class="fa fa-check" aria-hidden="true"></i>' : '<i class="fa fa-ban" aria-hidden="true"></i>';
                    }
                }]
            });
        });
    </script>
}